<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="/tpshop/Public/common/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.left div{
				display: none;
			}
		</style>
		<script type="text/javascript">
			$(function(){
				
				
			});
		</script>
	</head>
	<body>
		<header>
			<div>
				<ul>
					<li><a href="">清除缓存</a></li>
					<li>
						<a href="">后台管理</a>
						<ul>
							<li><a href="">Admin</a></li>
							<li><a href="">修改密码</a></li>
							<li><a href="">前台首页</a></li>
							<li><a href="">退出</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</header>
		
		<!--内容区域-->
		<div class="main">
			<div class="left">
				<h2 id="Admin">管理员管理</h2>
				<div class="item">
					<p><a href="<?php echo U('Admin/index');?>">管理员列表</a></p>
				</div>
				
				<h2 id="User">用户管理</h2>
				<div class="item">
					<ul>
						<li><a href="<?php echo U('User/index');?>">用户列表</a></li>
					</ul>
				</div>
				
				<h2 id="User">分类管理</h2>
				<div class="item">
					<ul>
						<li><a href="<?php echo U('Types/index');?>">分类列表</a></li>
					</ul>
				</div>
				
				<h2 id="User">系统管理</h2>
				<div class="item">
					<ul>
						<li><a href="<?php echo U('Sys/lunbo_list');?>">轮播图列表</a></li>
					</ul>
				</div>
			</div>
			
			<div class="right">
				

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			function users(id){
				$.post("<?php echo U('ajax_user_info');?>",{id:id},function(data){
					if(data==0){
						$(".users").html('<h1>该用户资料缺失</h1>').show();
						
					}else{
						$(".users").html(data).show();
					}
				});
			}
		</script>
	</head>
	<body>
		
		<table border="" cellspacing="" cellpadding="">
			<tr>
				<th>ID</th>
				<th>NAME</th>
				<th>PASS</th>
				<th>加入时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
			<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?><tr>
				<td><?php echo ($row[id]); ?></td>
				<td onclick="users(<?php echo ($row[id]); ?>)"><?php echo ($row[name]); ?></td>
				<td><?php echo ($row[pass]); ?></td>
				<td><?php echo date('Y-m-d H:i:s',$row[time]);?></td>
				<?php if($row['status'] == 0): ?><td>开启</td>
				<?php else: ?>
					<td>黑名单</td><?php endif; ?>
				<td>
					<a href="<?php echo U('reset',array('id'=>$row['id']));?>">重置密码</a>
				</td>
			</tr><?php endforeach; endif; else: echo "" ;endif; ?>
			
		</table>
		<?php echo ($total); ?>
		<nav>
			<?php echo ($page); ?>
		</nav>
		
		<div class="users" style="display: none;">
			
		</div>
		
		
	</body>
</html>

			</div>
			
		</div>
			
	</body>
	<script type="text/javascript">
		$(".left h2").click(function(){
			$(this).next().toggle(300);
			$('.left div').not($(this).next()).hide(300);
//					$(".item ul").hide();
//					$(this).parent().next().toggle(500);
				});
				var cName = "<?php echo (CONTROLLER_NAME); ?>";
				$("#" + cName).click();
	</script>
</html>